package org.example.exception;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class BizException extends RuntimeException {
    // 异常码
    private String errorCode;
    // 错误信息
    private String errorMessage;

    // 构造函数，传入BaseExceptionInterface类型的参数
    public BizException(BaseExceptionInterface baseExceptionInterface) {
        // 将BaseExceptionInterface中的异常码和错误信息赋值给BizException中的异常码和错误信息
        this.errorCode = baseExceptionInterface.getErrorCode();
        this.errorMessage = baseExceptionInterface.getErrorMessage();
    }
}

